<html>
<head>
<title>==Mu Duel== [ Resets Ranking]</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style2.css" rel="stylesheet" type="text/css">
</head>
<?PHP 
include("config.php");
 ?>
 <?PHP include("config.php");
require_once "sql_inject.php"; 
$bDestroy_session = TRUE; 
$url_redirect = 'index.php'; 
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect)  ; 
require 'config.php';
?>
<script language="JavaScript">
 function blockError(){return true;}
 window.onerror = blockError;
 </script>
<script language=JavaScript>
 function disableselect(e) {
    return false
 } 
 function reEnable() {
    return true
 }
 //if IE4+
 document.onselectstart=new Function ("return false")
 //if NS6
 if (window.sidebar) { 
    document.onmousedown=disableselect
    document.onclick=reEnable
 }
 </script>
<SCRIPT language=JavaScript>
<!--

var message="Gosto do site né safado! ta querendo copiar o que?";


function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 
</SCRIPT><STYLE>BODY {
	CURSOR: url('seta.cur')
}
</STYLE><style TYPE="text/css">
<!--
{  }
body { scrollbar-face-color: #ff6600; 
scrollbar-3dlight-color: #6a6a6a;
scrollbar-arrow-color: #fc9b00;
scrollbar-darkshadow-color: #000000;
scrollbar-face-color: #444444;
scrollbar-highlight-color: #444444;
scrollbar-shadow-color: #000000;
scrollbar-track-color: #2e2e2e}-->
</style>
<body bgcolor="#000000" text="#FFFFFF">
<?
include("config.php");
$query = 'SELECT TOP 50 Name, Class, clevel,Strength,Energy,Dexterity,Vitality,Resets,Experience,Accountid from Character order by Resets desc ';
$result = mssql_query($query);
?>
<center>
  <table width="535" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="86"><br>        <table width="341" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="68" height="100"><div align="center"><font color="#990000" size="5"><img src="img/16.jpg" width="68" height="100"></font></div>
            </td>
            <td width="205" background="img/15.JPG"><div align="center"><strong><font color="#FFFFFF" size="5">Ranking
                    de Resets</font></strong></div>
            </td>
            <td width="68"><div align="center"><img src="img/17.JPG" width="68" height="100"></div>
            </td>
          </tr>
      </table></td></tr>
  </table>
  <br>
  <table width="429" border="1" cellpadding="0" cellspacing="1" bordercolor="#000000">
    <!--DWLayoutTable-->
    <tr> 
      <td height="14" colspan="10" valign="top"><div align="center"><font size="4" face="Verdana, Arial, Helvetica, sans-serif"></font></div></td>
    </tr>
    <!--DWLayoutTable-->
    <tr> 
      <td width="33" height="21" valign="top" background="img/anuncio.JPG"><div align="center"><span class="style4">Nº</span></div></td>
      <td width="111" valign="top" background="img/anuncio.JPG"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><span class="style4">Nome</span></strong></font></div></td>
      <td width="52" valign="top" background="img/anuncio.JPG"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><span class="style4">Classe</span></strong></font></div></td>
      <td width="59" valign="top" background="img/anuncio.JPG"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><span class="style4">Niveis</span></strong></font></div></td>
      <td width="68" valign="top" background="img/anuncio.JPG"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><span class="style4">Resetes</span></strong></font></div></td>
      <td width="53" valign="top" background="img/anuncio.JPG"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><span class="style4">Status</span></strong></font></div></td>
      <td width="37" valign="top" background="img/anuncio.JPG"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><span class="style4">VIP</span></strong></font></div></td>
    </tr>
    <?
		for($i=0;$i < mssql_num_rows($result);++$i)
			{
			$row = mssql_fetch_row($result);
			
 //           $query2="Select ConnectStat from MEMB_STAT where memb___id='$row[9]'";
 //           $result2 = mssql_query($query2);
  //          $row2 = mssql_fetch_row($result2);


$query3 = "Select accountid From character WHERE name='$row[0]'";
$result4 = mssql_query( $query3 );
$rowz = mssql_fetch_row($result4);
$memba = $rowz[0];
$query2 = "Select connectstat From memb_stat WHERE memb___id='$memba'";
$resultz = mssql_query( $query2 );
$rowx = mssql_fetch_row($resultz);
$rapr = $rowx[0];
if ($rapr == '1') { $online = "<center><img src=images/online.gif>"; $on = $on + 1; }
if ($rapr == '0') { $online = "<center><img src=images/offline.gif>"; }

$query4 = "Select VIP From MEMB_INFO WHERE memb___id='$memba'";
$result5 = mssql_query( $query4 );
$rowvip = mssql_fetch_row($result5);
$vip = $rowvip[0];
if ($vip >= 1) {$VIP = "<img src=images/vip1.gif>";}
if ($vip <= 0) {$VIP = "<img src=images/vip2.gif>";}

$reset = $row2[9];
if ($reset <= '0') {$reset = '0';}

			$rank = $i+1;
			if($row[1] == 0){ $row[1] =  'DW';
			}
			if($row[1] == 1){ $row[1] =  'SM';
			}
			if($row[1] == 16){ $row[1] =  'DK';
			}
			if($row[1] == 17){ $row[1] =  'BK';
			}
			if($row[1] == 32){ $row[1] =  'Elfa';
			}
			if($row[1] == 33){ $row[1] =  'ME';
			}
			if($row[1] == 48){ $row[1] =  'MG';
			}
			if($row[1] == 64){ $row[1] =  'DL';
			}
			if($row2[0] == 0){ $row2[0] ='<img src=images/Offline.gif>';
            }
            if($row2[0] == 1){ $row2[0] ='<img src=images/Online.gif>';
            }
            
            $reset = $row[7];
			if ($reset <= '0') {$reset = '0';}
			echo "<tr>
			  <td valign=top align=left class=style1>$rank</td>
              <td valign=top align=left class=style1><center>$row[0]</center></td>
              <td valign=top align=left class=style1><center>$row[1]</center></td>
			  <td valign=top align=left class=style1><center>$row[2]</center></td>
			  <td valign=top align=left class=style1><center>$reset</center></td>
			  <td valign=top align=left class=style1><center>$online</center></td>
			  <td valign=top align=left class=style1><center>$VIP</center></td>
              </tr>";
			}
		?>
  </table>
  <br>
  <strong><a href="rankings.php" target="menu"><font color="#CCCCCC"><br>
  &lt;&lt;Voltar
  </font> </a></strong>
</center>
</body>
</html>
